package top.lunarye.modules.staff.service;

import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import top.lunarye.annotation.TokenToStaff;
import top.lunarye.modules.staff.entity.Staff;
import com.baomidou.mybatisplus.extension.service.IService;
import top.lunarye.modules.staff.entity.dto.StaffInsertDTO;
import top.lunarye.modules.staff.entity.dto.StaffSelectDTO;
import top.lunarye.modules.staff.entity.dto.StaffUpdateDTO;
import top.lunarye.modules.staff.entity.dto.UserInfoDTO;
import top.lunarye.utils.RestResponse;

import java.util.List;

/**
 * <p>
 * 人员表 服务类
 * </p>
 *
 * @author lunar
 * @since 2021-07-13
 */
public interface IStaffService extends IService<Staff> {
    /**
     * 添加用户
     * @param staff 用户信息
     * @return 添加成功与否
     */
    boolean addStaff(Staff staff);

    List<StaffSelectDTO> selectStaffList();

    Staff selectStaffByUsername(String username);

    RestResponse<String> addList(MultipartFile file);

    RestResponse<String> updateStaff(StaffUpdateDTO staff, Staff loginStaff);

    RestResponse<String> disableStaff(Integer id, Staff loginStaff);

    RestResponse<String> enableStaff(Integer id, Staff loginStaff);

    RestResponse<String> deleteStaff(Integer id, Staff loginStaff);

    RestResponse modifySelf(Staff loginStaff, UserInfoDTO userInfoDTO);

    RestResponse modifyPwd(Staff loginStaff, String pwd);
}
